package org.example.io;

import java.io.*;

public class Main {
    public static void main(String[] args) throws IOException {

        long startTime = System.currentTimeMillis();
        InputStreamReader inputStreamReader = new InputStreamReader(new FileInputStream("D:\\test\\output.txt"));
        BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
        OutputStreamWriter outputStreamWriter = new OutputStreamWriter(new FileOutputStream("D:\\test\\iotest\\b\\aa.txt"));
        String s = null;
        while (true) {
            s = bufferedReader.readLine();
            if (s ==null) {
                break;
            }
            outputStreamWriter.write(s);
        }
        outputStreamWriter.flush();
        inputStreamReader.close();
        outputStreamWriter.close();
        long endTime = System.currentTimeMillis();
        System.out.println("用时：:"+ (endTime - startTime));

    }
}
